package com.yanlin.apipassenger.controller;

import com.yanlin.apipassenger.service.UserService;
import com.yanlin.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>标题：UserController</p>
 * <p>功能：乘客用户</p>
 * <p>
 * 其他说明：
 * </p>
 * <p>审核：</p>
 * <p>重构：</p>
 * <p>创建日期：2025-06-08 17:51</p>
 *
 * @author yanlin
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/user")
    public ResponseResult getUser(@RequestHeader("Authorization") String accessToken) {
        return userService.getUserByAccessToken(accessToken);
    }
}